Risk address identification method and apparatus, and electronic device

ABSTRACT

Embodiments of the specification disclose a risk address identification method and apparatus, and an electronic device. The risk address identification method includes: acquiring an address word sequence corresponding to an input address; determining an address word in the address word sequence, the determined address word matching a risk word corresponding to a risk address; generating an observation sequence corresponding to the address word sequence according to the determined address word; processing the observation sequence using a hidden Markov model obtained based on semantics learning before and after address words, to obtain a decision vector, wherein the decision vector represents probabilities of the risk address being matched by address words contained in the address word sequence; and identifying whether the input address is a risk address by making a classification decision on the decision vector.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of InternationalApplication No. PCT/CN2018/093791, filed on Jun. 29, 2018, which isbased upon and claims priority to Chinese Patent Application No.201710543805.4, filed on Jul. 5, 2017, the entire content of all ofwhich is incorporated herein by reference.

TECHNICAL FIELD

The specification relates to the field of computer technologies, and inparticular to a risk address identification method and apparatus, and anelectronic device.

TECHNICAL BACKGROUND

Online financial transactions are becoming more and more developed, andsome users unlawfully use online finance to conduct illegal moneyoperations, such as money laundering. In order to prevent the occurrenceof illegal online financial transactions, there are already somesolutions for identifying risk addresses, which are generally solutionstargeted at identifying relatively regular risk addresses.

For example, word segmentation and labeling may be performed on an inputaddress using a word segmentation algorithm, and finally address wordmatching is performed one by one according to the labeled information ofdifferent address words, so as to identify whether the input address isa risk address through the matching result.

Based on the prior art, a more accurate risk address identificationsolution is needed.

SUMMARY

The embodiments of the specification provide a risk addressidentification method and apparatus, and an electronic device, forsolving the technical problem that a more accurate risk addressidentification solution is needed.

In an embodiment, a risk address identification method comprises:acquiring an address word sequence corresponding to an input address;determining an address word in the address word sequence, the determinedaddress word matching a risk word corresponding to a risk address;generating an observation sequence corresponding to the address wordsequence according to the determined address word; processing theobservation sequence using a hidden Markov model obtained based onsemantics learning before and after address words, to obtain a decisionvector, wherein the decision vector represents probabilities of the riskaddress being matched by address words contained in the address wordsequence; and identifying whether the input address is a risk address bymaking a classification decision on the decision vector.

In an embodiment, a risk address identification apparatus comprises: areceiving module for acquiring an address word sequence corresponding toan input address; a matching module for determining an address word inthe address word sequence, the determined address word matching a riskword corresponding to a risk address; a generation module for generatingan observation sequence corresponding to the address word sequenceaccording to the determined address word; a labeling module forprocessing the observation sequence using a hidden Markov model obtainedbased on semantics learning before and after address words, to obtain adecision vector, wherein the decision vector represents probabilities ofthe risk address being matched by address words contained in the addressword sequence; and an identification module for identifying whether theinput address is a risk address by making a classification decision onthe decision vector.

In an embodiment, an electronic device comprises: a processor; and amemory for storing instructions executable by the processor; wherein theprocessor is configured to: acquire an address word sequencecorresponding to an input address; determine an address word in theaddress word sequence, the determined address word matching a risk wordcorresponding to a risk address; generate an observation sequencecorresponding to the address word sequence according to the determinedaddress word; process the observation sequence using a hidden Markovmodel obtained based on semantics learning before and after addresswords, to obtain a decision vector, wherein the decision vectorrepresents probabilities of the risk address being matched by addresswords contained in the address word sequence; and identify whether theinput address is a risk address by making a classification decision onthe decision vector.

In an embodiment, a computer-readable storage medium stores thereoninstructions that, when executed by a processor of a device, cause thedevice to perform the above risk address identification method.

The above-mentioned technical solutions can achieve the followingbeneficial effects: using a hidden Markov model obtained based onsemantics learning before and after address words and a support vectormachine model to obtain a classification determination result of aninput address according to an address word obtained after processing theinput address and the semantics before and after the address word, sothat a risk address can be identified more accurately.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of this specification, illustrate embodiments and, together withthe description, serve to explain the principles of the specification.

FIG. 1 is a schematic diagram of an overall architecture for riskaddress identification, according to an embodiment.

FIG. 2 is a flowchart of a risk address identification method, accordingto an embodiment.

FIG. 3 is a flowchart of a modeling method for a hidden Markov model,according to an embodiment.

FIG. 4 is a flowchart of a modeling method for a support vector machinemodel, according to an embodiment.

FIG. 5 is a schematic diagram of a risk address identificationapparatus, according to an embodiment.

FIG. 6 is a flowchart of a risk address identification process thatindicates that an address has no risk, according to an embodiment.

FIG. 7 is a flowchart of a risk address identification process thatindicates that an address is risky, according to an embodiment.

FIG. 8 is a flowchart of a modeling and identification method for riskaddress identification, according to an embodiment.

FIG. 9 is a schematic diagram of an electronic device, according to anembodiment.

DETAILED DESCRIPTION

Embodiments of the specification provide a risk address identificationmethod and apparatus, and an electronic device.

In order to make those skilled in the art better understand thetechnical solutions in the specification, the technical solutions in theembodiments of the specification will be clearly and completelydescribed below in conjunction with the accompanying drawings. Thedescribed embodiments are exemplary, but not all embodiments consistentwith the specification.

FIG. 1 is a schematic diagram of an overall architecture 10 for riskaddress identification, according to embodiments of the specification.In the overall architecture 10, an address is firstly input andprocessed by a device 11 containing a Hidden Markov Model (HMM) toobtain a decision vector corresponding to the input address, then thedecision vector is further processed by a device 12 containing a SupportVector Machine (SVM), and finally, whether the input address is a riskaddress is determined. Although shown as two separated devices in FIG.1, the device 11 and the device 12 may also be implemented with onedevice or more than two devices.

Based on the overall architecture 10, the solution of the specificationwill be described in detail below.

FIG. 2 is a flowchart of a risk address identification method 100,according to an embodiment. Referring to FIG. 2, the method 100 mayinclude the following steps.

In step S102, an address word sequence corresponding to an input addressis acquired.

The address word sequence can be obtained after processing the inputaddress.

For example, if the input address contains many interference characters,an interference character removing operation can be firstly performed onthe input address, and then an address word sequence is furtherobtained. The address word sequence may also be the input address itselfif the input address includes word separators such as spaces, or if theprocessing ability, for excluding interference characters, of the riskaddress identification in the subsequent steps is good.

In step S104, an address word hitting a risk word corresponding to eachrisk address is determined in various address words contained in theaddress word sequence.

For example, the various risk addresses may be a risk address librarycomposed of multiple risk addresses.

Also for example, a risk word may be a risky address word contained inthe risk address. The risk address may contain one or more risk words,and these risk words may constitute the risk address sequentiallyaccording to a certain rule or may be relatively independent.

The method for determining hitting may, for example, comprise:respectively scanning each address word in the address word sequence andmatching the scanned address word with each address word in the riskaddress, and determining the scanned address word as a hit address wordif the scanned address word matches an address word in the risk address.

For example, if an address word sequence contains multiple addresswords, and an address word A in the address sequence matches and hits arisk word a contained in a risk address, the address word sequence canbe represented as one multi-dimensional vector, with each dimension ofthe vector respectively corresponding to one address word in the addressword sequence; further, the dimension, in the vector, corresponding tothe address word A can be determined by scanning, and the dimension islabeled as 1 to determine that the address word A is hit; and for theother address words that are not hit, the corresponding dimensions arelabeled as 0.

In step S106, an observation sequence corresponding to the address wordsequence is generated according to the determined address word.

There are many ways of generating an observation sequence correspondingto the address word sequence: each of required address words can beobtained from the address word sequence according to the determinedaddress word and the semantics before and after it, and an observationsequence is generated according to the determined address word and theobtained address words, wherein the obtained address words may becontinuous address words, and may also be discontinuous address wordsthat conform to a certain rule;

The way of generating an observation sequence corresponding to theaddress word sequence may also be: first splitting the address wordsequence to obtain a plurality of address word sub-sequences, and thengenerating an observation sequence according to required address wordsub-sequence.

In step S108, the observation sequence is processed using a hiddenMarkov model obtained based on semantics learning before and afteraddress words, to obtain a decision vector, wherein the decision vectorrepresents probabilities of the risk address being hit by the variousaddress words contained in the address word sequence.

The semantics before and after address words may be associated semanticsof address words before and after, and associated with, a currentaddress word, and the current address word, and the number of associatedaddress words may be, e.g., two or three, wherein the associated addresswords may be either address words adjacent to the current address wordor address words spaced apart from the current address word by at leastone word.

For example, the above-mentioned current address word may be thedetermined address word in step S106. The semantics before and after theaddress word may be that the address words before and after, andadjacent to, the determined address word serve as the semantics beforeand after the address word. In the example of Chaoyang District,Beijing, China, the semantics before and after Beijing includes Chinaand Chaoyang District. In another example, address words, in the addressword sequence, not adjacent to each other may be used as the semanticsbefore and after the determined word.

Further, in order to simplify processing steps, an observation sequencemay also be an address word sequence or an input address itself. In thiscase, the probability of hitting the risk address can be labeleddirectly based on the hit address word and the semantics before andafter it according to a labeling result of the hit address word in theaddress word sequence or the input address.

In step S110, whether the input address is a risk address is identifiedby making a classification decision on the decision vector.

The classification decision may be a binary classification decision madeon the decision vector. For example, one class may be a decision vectorcorresponding to a risk address, and the other class may be a decisionvector corresponding to a non-risk address. Further, whether the inputaddress corresponding to the decision vector is a risk address may bedetermined.

In the embodiments of the specification, for step S102, acquiring anaddress word sequence corresponding to an input address may specificallycomprise: receiving an input address; and performing data cleaningprocessing and word segmentation processing on the input address toobtain an address word sequence corresponding to the input address.

The method of the data cleaning processing may comprise: removing aninterference character from the input address to obtain a standardizedaddress character string; or adjusting the arrangement order of variousaddress words in the input address.

The method of the word segmentation processing may comprise: segmentingthe standardized address character string using a specific charactersuch as a space or a semicolon, to obtain an address word sequencecorresponding to the input address.

As mentioned above, if the input address contains many interferencecharacters, an interference character removing operation can be firstlyperformed on the input address, and then an address word sequence isfurther obtained.

For example, first, data cleaning is performed on some interferencecharacters existing in an input address to remove the interferencecharacters, wherein the interference characters may, for example,include at least one of the following: extra spaces, half-widthcharacters, “|”, “:”, “˜”, etc., and the cleaned input address can be,for example, a standardized address character string separated byspaces; then, word segmentation labeling is performed: the cleanedaddress character string is segmented by spaces, auxiliary words, suchas of and the, appearing in the address character string are labeledlexicographically, and these auxiliary words often can be not used insubsequent address matching and identification; and finally, an addressword sequence composed of address words is obtained after the wordsegmentation labeling. After performing cleaning and word segmentationon the input address, an address word sequence is obtained, so thatquick, efficient and accurate operations such as identification of riskaddress words can be performed on the address word sequencesubsequently.

As mentioned above, the address word sequence may also be the inputaddress itself if the input address includes word separators such as aspace, or if the processing ability, for excluding interferencecharacters, of the risk address identification in the subsequent stepsis good; as such, the step of processing the input address can beomitted.

In the embodiments of the specification, for step S104, determining, invarious address words contained in the address word sequence, an addressword hitting a risk word corresponding to each risk address mayspecifically comprise: respectively matching the various address wordsin the address word sequence using risk words corresponding to each riskaddress; and if one of the address words is successfully matched,labeling that address word and determining that address word as anaddress word hitting a risk word corresponding to each risk address.

The labeling may be: correspondingly labeling, with a number or acharacter, a matching result of various address words in the addressword sequence respectively, including labeling a result indicatinghitting and labeling a result indicating not hitting after the matchingin the address word sequence, and composing a labeling vector togetherby these numbers or characters indicating the labeling results.

For example, an address word sequence or various address words in anobservation sequence corresponding to the address word sequence isglobally scanned, matched, and labeled, and if the second address word Ain the address word sequence matches an address word a in an addressword set corresponding to a risk address, then the address word A islabeled as 1, otherwise the address word A is labeled as 0. Further, alabeling vector is obtained, which may also be referred to as an initiallabeling vector, such as [0, 0, 1, 0, 0, 0].

The various address words in the address word sequence are respectivelymatched, and the specific matching method may comprise: performingglobal risk address scanning and matching on the address word sequence(e.g., risk address information includes countries, regions, and majorcities), wherein the matching algorithms used may, for example, includea character string similarity matching algorithm, a pronunciationsimilarity matching algorithm, and an editing distance matchingalgorithm, etc.

Further, determining, in various address words contained in the addressword sequence, an address word hitting a risk word corresponding to eachrisk address further comprises: if there is no successfully matchedaddress word, determining that the input address is not a risk address.

If various address words in a certain address word sequence do not matchrisk words in the risk addresses, then it can be considered that theaddress word sequence does not contain a risk word, and correspondinglythe probability that the input address is not a risk address is greater,so further operations on the input address can be ended.

In the embodiments of the specification, for step S106, generating anobservation sequence corresponding to the address word sequenceaccording to the determined address word may specifically comprise: forthe determined address word, respectively performing the following:generating an observation sequence corresponding to the address wordsequence according to the address word and associated words of theaddress word in the address word sequence, wherein the associated wordsreflect the semantics before and after the address word in the addressword sequence.

If the address word sequence contains a plurality of address wordsdetermined at step S104, a plurality of corresponding observationsequences may be generated, and it may also be chosen to generate anobservation sequence corresponding to one of the determined addresswords. An associated word can be understood as a word that has a certainlogical relationship or a specific association relationship with wordsbefore and after it, or a word artificially defined to produce anassociation relationship with words before and after it. Generally, theassociated words are adjacent to the current word, for example they canbe two words before or after, and adjacent to, the current word.

In the embodiments of the specification, a hidden Markov model can beobtained in advance based on the semantics learning before and afteraddress words.

FIG. 3 is a flowchart of a modeling method 200 for a hidden Markovmodel, according to an embodiment. Referring to FIG. 3, the method 200may include the following steps.

Step S202: extracting initial parameters according to predefinedtraining samples, and establishing an initial model containing hiddenMarkov model parameters according to the initial parameters, wherein thetraining samples are risk addresses or non-risk addresses;

Step S204: generating observation sequences corresponding to thetraining samples according to address words contained in the trainingsamples and the semantics before and after the address words; and

Step S206: training the hidden Markov model parameters according to theinitial model and the observation sequences corresponding to thetraining samples to obtain a hidden Markov model.

The training samples include positive samples and negative samples; arisk address can be a positive sample, and a non-risk address can be anegative sample. By training the hidden Markov model with positive andnegative samples, a better training effect can be achieved.

In an embodiment, the negative samples may be the addresses of 235non-sanction countries or regions in the whole world, and the positivesamples may be address data for all sanction countries and regions. Itshould be noted that, in general, a risk address contains a risk word,and a non-risk address may also contain a risk word.

The address words in step S204 may be address words, which match therisk words corresponding to the risk addresses, in the training samples.In a predefined sample address, whether the sample address contains arisk word and which address word is a risk word have been labeled inadvance. Here, the sample address is a training sample address containedin the training samples.

In an embodiment, a required observation sequence is extracted accordingto the labeled address word in the sample address and the semanticsbefore and after it; and generally, 2 or 3 words before and after andassociated with the labeled address word are selected as the semanticsbefore and after the address word, which all together form theobservation sequence.

In an embodiment, according to the obtained initial labeling model andobservation sequence, hidden Markov model parameters are trained untilappropriate hidden Markov model parameters are obtained, and then aneeded hidden Markov model is determined according to the hidden Markovmodel parameters obtained through the training.

In the modeling method 200, the quantity and scale of training sampleaddresses may affect the quality of the training result. When theaddress library used for the training sample addresses is morecomprehensive and has a wider coverage, it is advantageous to improvethe accuracy of the identification of the model, and therefore, themethod 200 can achieve a great modeling effect in the case of havingenough training sample addresses.

In an embodiment, the initial parameters include: an initial probabilityvector π_(t), a state transition matrix, a_(ij), and the like; andextracting initial parameters according to predefined training samplesmay specifically comprise: based on the training samples, obtaining aninitial probability vector by respectively performing probabilitylabeling on the address words contained in the training samples; andobtaining a state transition matrix of the sample addresses according tostate transition probabilities, between a risk word and a non-risk word,of the address words contained in the training samples. Here, a riskword is an address word contained in a risk address, a non-risk word isan address word contained in a non-risk address, and some address wordscan be both risk words and non-risk words.

There may be a plurality of training samples. Generally, each trainingsample may be a sample address. When probability labeling is performed,a sample address is selected from the set as a training sample; forexample, after probability labeling is performed on address words in acertain sample address, the second address word in the sample address isa hit address word, and an initial probability vector π_(t)=10, 1, 0, 0,0, 01 is obtained, where 1 represents a hit address word, and 0represents an address words that is not hit.

In an embodiment, a state transition matrix of the sample addresses isobtained according to state transition probabilities, between a riskword and a non-risk word, of the address words contained in the trainingsamples. In one or more embodiments of the specification, the statetransition probability refers to the probability that state transitionof an address word between two hidden states, i.e., a risk address and anon-risk address, may happen.

In the embodiments of the specification, training the hidden Markovmodel parameters according to the initial model and the observationsequences corresponding to the training samples to obtain a hiddenMarkov model may specifically comprise: according to the initial modeland the observation sequences corresponding to the training samples,using a Baum-Welch algorithm to train the hidden Markov model parametersso as to obtain a hidden Markov model.

In addition, other data for training the hidden Markov model parameterscan also be acquired, for example, O=o₁o₂ . . . o_(h) . . .o_(n-1)o_(n), wherein the sequence O is an address word sequencecontaining a hit risk country/region word, and o_(h) is an address wordto be labeled. Generally, it is possible to take n=10; an observationsequence is obtained according to 3 words before and after the addressword in the context of o_(h) to be labeled, wherein S=s₁s₂ . . . s_(h) .. . s_(n-1)s_(n) is the labeling vector corresponding to the addressword sequence O, and represents the probabilities of the risk addressbeing hit by various address words in the address word sequence; andthen the hitting probabilities of the various address words form thelabeling vector, wherein the labeling vector may be the initial labelingvector; P(o_(h),s_(h)|λ) indicates the probability that the address wordsequence o_(h) and its hit label s_(h) are correct, and is used forselecting a needed hidden Markov model parameter λ; and then, the hiddenMarkov model parameter λ is trained according to the above-mentionedparameter to obtain a hidden Markov model.

In an embodiment, an objective function of the model is defined as:argmaxP(o_(h),s_(h)|λ), to facilitate the acquisition of a neededdecision vector.

In the embodiments of the specification, for step S108, processing theobservation sequence using a hidden Markov model obtained based onsemantics learning before and after address words, to obtain a decisionvector may specifically comprise: processing the observation sequenceusing the hidden Markov model obtained by semantics learning before andafter address words, and a Viterbi algorithm, to obtain a decisionvector, wherein the decision vector represents the probabilities of therisk address being hit by the various address words contained in theaddress word sequence. In addition, the decision vector may alsorepresent the probabilities of the risk address being hit by variousaddress words contained in the observation sequence corresponding to theaddress word sequence, and an address word not contained in theobservation sequence may be directly labeled as 0.

For example, if an address word sequence [A, B, C, D, E, F] has acorresponding observation sequence [B, C, D], then an obtained decisionvector may be represented as [0, 0.5, 1, 0.3, 0, 0].

In the embodiments of the specification, for step S110, making aclassification decision on the decision vector may specificallycomprise: making a classification decision on the decision vector usingan SVM model obtained through training.

Generally, a decision vector is obtained by calculation through a hiddenMarkov model, and then a decision with binary or more classification ismade on the decision vector; and explanation is made below by mainlytaking a binary classification decision as an example.

FIG. 4 is a flowchart of a modeling method 300 for a support vectormachine model, according to an embodiment. Referring to FIG. 4, themethod 300 may include the following steps.

Step S302: acquiring training samples for a support vector machine;

Step S304: mapping the training samples of the support vector machine toa high-dimensional feature space, to obtain a sample feature spacecorresponding to the training samples of the support vector machine;

Step S306: acquiring, from the sample feature space, parametersrepresenting sample features, and establishing a discrimination functionfor determining a category of the sample features according to theparameters of the sample features; and

Step S308: training corresponding SVM model parameters in thediscrimination function based on the training samples of the supportvector machine, to obtain the SVM model.

The training samples for the support vector machine may be decisionvectors corresponding to training samples obtained by training sampleaddresses through the above-mentioned hidden Markov model, or may beother to-be-discriminated data characterizing the input address.

In an embodiment, the SVM can map a decision vector address to ahigh-dimensional feature space by selecting a multi-power polynomialkernel function, and the expression is as follows:

κ(x,x _(i))=((x·x _(i))+1)^(d)

The SVM is used to find the optimal classification hyperplane for eachcategory of sample features and other features in the high-dimensionalfeature space of the sample address, a support vector set representingvarious sample features and the corresponding VC credibility thereof areobtained, and the discrimination function for determining the categoryof each feature is formed:

${f(x)} = {\sum\limits_{i = 1}^{n}{\alpha_{i}y_{i}{\kappa \left( {x,x_{i}} \right)}}}$

In an embodiment, an SVM model parameter α_(i) is obtained by trainingbased on a large amount of address data such as global address librarydata, to further optimize the support vector machine model.

By address matching learning based on semantic identification, aclassification determination result of a risk address is obtainedaccording to a matching result of each address word and the semanticsbefore and after it, which can effectively identify risk addresses orforged risk addresses, and can avoid the misjudgment of risk-freeaddresses.

Embodiments of the specification further provide a risk addressidentification apparatus. FIG. 5 is a schematic diagram of a riskaddress identification apparatus 500 according to an embodiment. Forexample, the apparatus corresponds to the method 100 (FIG. 2), and mayinclude:

a receiving module 501 for acquiring an address word sequencecorresponding to an input address;

a matching module 502 for determining, in various address wordscontained in the address word sequence, an address word hitting a riskword corresponding to each risk address:

a generation module 503 for generating an observation sequencecorresponding to the address word sequence according to the determinedaddress word;

a labeling module 504 for processing the observation sequence using ahidden Markov model obtained based on semantics learning before andafter address words, to obtain a decision vector, wherein the decisionvector represents the probabilities of the risk address being hit by thevarious address words contained in the address word sequence; and

an identification module 505 for identifying whether the input addressis a risk address by making a classification decision on the decisionvector.

Using the hidden Markov model obtained based on semantics learningbefore and after address words and the support vector machine model, aclassification determination result of the input address is obtainedaccording to the address word obtained after processing the inputaddress and the semantics before and after it, which can effectivelyidentify risk addresses or forged risk addresses, and can avoid themisjudgment of risk-free addresses. Therefore, problems in the prior artcan be partially or completely solved.

In an embodiment, the receiving module 501 acquiring an address wordsequence corresponding to an input address may comprise: the receivingmodule 501 receiving an input address; and performing data cleaningprocessing and word segmentation processing on the input address toobtain an address word sequence corresponding to the input address.Through further cleaning processing and word segmentation processing onthe input address, a standardized address word sequence is obtained, soas to facilitate the labeling operation on the address word sequence insubsequent steps, which can improve the work efficiency of probabilitylabeling of the determined address words in the address word sequence.

In an embodiment, the matching module 502 determining, in variousaddress words contained in the address word sequence, an address wordhitting a risk word corresponding to each risk address may comprise: thematching module 502 respectively matching the various address words inthe address word sequence using risk words corresponding to each riskaddress; and if one of the address words is successfully matched,labeling same and determining same as an address word hitting a riskword corresponding to each risk address.

In an embodiment, the matching module 502 determining, in variousaddress words contained in the address word sequence, an address wordhitting a risk word corresponding to each risk address may furthercomprise: if there is no successfully matched address word, determiningthat the input address is not a risk address.

By labeling the address word through the matching module 502, quickpre-filtering of a risk input address and a risk-free input address canbe performed, which can improve the work efficiency of the risk addressidentification.

In an embodiment, the generation module 503 generating an observationsequence corresponding to the address word sequence according to thedetermined address word may comprise: for the determined address word,respectively performing the following: generating an observationsequence corresponding to the address word sequence according to theaddress word and associated words of the address word in the addressword sequence, wherein the associated words reflect the semantics beforeand after the address word in the address word sequence. Here, thesemantics before and after the address word refers to a plurality ofaddress words before and after, and associated with, the hit addressword, and the number of associated address words may be two or three,where the associated address words may be address words associatedcontinuously with the hit address word and may also be address wordsassociated with and spaced apart from the hit address word.

In an embodiment, obtaining a hidden Markov model based on the semanticslearning before and after address words comprises: extracting initialparameters according to predefined training samples, and establishing aninitial model containing hidden Markov model parameters according to theinitial parameters, wherein the training samples are risk addresses ornon-risk addresses; generating observation sequences corresponding tothe training samples according to address words contained in thetraining samples and the semantics before and after the address words;and training the hidden Markov model parameters according to the initialmodel and the observation sequences corresponding to the trainingsamples to obtain a hidden Markov model.

For the hidden Markov model, the observation sequence consisting of thehit risk word and the semantics before and after the risk word is usedto train the hidden Markov model parameters, so as to obtain therequired hidden Markov model (HMM), which can improve the accuracy ofinput address risk identification by the hidden Markov model.

In an embodiment, the initial parameters include: an initial probabilityvector and a state transition matrix; and extracting initial parametersaccording to predefined training samples may comprise: based on aplurality of training samples, obtaining an initial probability vectorby respectively performing probability labeling on the address wordscontained in the training samples; and obtaining a state transitionmatrix of the sample addresses according to state transitionprobabilities, between a risk word and a non-risk word, of the addresswords contained in the training samples. Here, a risk word is an addressword contained in a risk address, a non-risk word is an address wordcontained in a non-risk address, and some address words can be both riskwords and non-risk words.

In an embodiment, training the hidden Markov model parameters accordingto the initial model and the observation sequences corresponding to thetraining samples to obtain a hidden Markov model may specificallycomprise: according to the initial model and the observation sequencescorresponding to the training samples, using a Baum-Welch algorithm totrain the hidden Markov model parameters so as to obtain a hidden Markovmodel.

It should be noted that during the modeling of the hidden Markov model,the quantity and scale of training sample addresses may affect thequality of the training result. When the global address library used forthe training sample addresses is more comprehensive and has a widercoverage, the rate of identification while using the model will bevastly improved, and therefore, a great modeling effect can be achievedin the case of having enough training sample addresses.

In an embodiment, the labeling module 504 processing the observationsequence using a hidden Markov model obtained based on semanticslearning before and after address words, to obtain a decision vector maycomprise: processing the observation sequence using the hidden Markovmodel obtained by semantics learning before and after address words, anda Viterbi algorithm, to obtain a decision vector. The decision vectorrepresents the probabilities of the risk address being hit by thevarious address words contained in the address word sequence.

In an embodiment, the identification module 505 making a classificationdecision on the decision vector may comprise: making a classificationdecision on the decision vector using a support vector machine (SVM)model obtained through training.

In an embodiment, obtaining a support vector machine model throughtraining comprises: acquiring training samples for a support vectormachine; mapping the training samples of the support vector machine to ahigh-dimensional feature space, to obtain a sample feature spacecorresponding to the training samples of the support vector machine;acquiring, from the sample feature space, parameters representing samplefeatures, and establishing a discrimination function for determining acategory of the sample features according to the parameters of thesample features; and training corresponding SVM model parameters in thediscrimination function based on the training samples for the SVM, toobtain an SVM model.

The training samples may be the decision vector in the above-mentionedembodiments, or other to-be-discriminated data characterizing the inputaddress.

Generally, for a decision vector calculated through the hidden Markovmodel, the SVM needs to be used to map the decision vector to ahigh-dimensional feature space and then make a binary classificationdecision. A classification decision can also be made on some decisionvectors, which are easy to process, without mapping same to ahigh-dimensional feature space, for example, a linear classificationdecision can be made, which can reduce the computational difficulty andpromote the processing speed.

Embodiments of the specification further provide an electronic device,comprising: at least one processor; and a memory in communicationconnection with the at least one processor, wherein the memory storesinstructions executable by the at least one processor, the instructionsbeing executed by the at least one processor to cause the at least oneprocessor to: acquire an address word sequence corresponding to an inputaddress; determine, in various address words contained in the addressword sequence, an address word hitting a risk word corresponding to eachrisk address; generate an observation sequence corresponding to theaddress word sequence according to the determined address word; processthe observation sequence using a hidden Markov model obtained based onsemantics learning before and after address words, to obtain a decisionvector, wherein the decision vector represents probabilities of the riskaddress being hit by the various address words contained in the addressword sequence; and identify whether the input address is a risk addressby making a classification decision on the decision vector.

Each of the above described modules may be implemented as software, orhardware, or a combination of software and hardware. For example, eachof the above described modules may be implemented using a processorexecuting instructions stored in a memory. Also, for example, each theabove described modules may be implemented with one or more applicationspecific integrated circuits (ASICs), digital signal processors (DSPs),digital signal processing devices (DSPDs), programmable logic devices(PLDs), field programmable gate arrays (FPGAs), controllers,micro-controllers, microprocessors, or other electronic components, forperforming the described methods.

FIG. 6 is a flowchart of a risk address identification process 600 thatindicates that an address has no risk, according to an embodiment.Referring to FIG. 6, the process 600 may include the following:

first, the text of an input address being: REPUBLICA DE SIRIA 7495 SANTAFE Santa Fe AR;

then, globally scanning and labeling the input address (602) as hittinga sanction address (country or city) word: SIRIA, and obtaining aninitial labeling vector [0, 0, 1, 0, 0, 0, 0, 0, 0] of the inputaddress, where the initial labeling vector is also the initialprobability vector;

further, obtaining a decision vector [0.01, 0.02, 0.02, 0.02, 0.01, 0,0, 0, 0] through a hidden Markov labeling model (604); and

finally, the SVM classification model (606) making a decision that: theinput address does not hit the sanction address (608), wherein thesanction address is the risk address in this embodiment.

FIG. 7 is a flowchart of a risk address identification process 700 thatindicates that an address is risky, according to an embodiment Referringto FIG. 7, the process 700 may include the following:

first, the text of an input address being: Rostovskaya, 31a, Simferopol5 Other RU:

then, globally scanning and labeling the input address (702) as hittingthe sanction address (country or city) word: Simferopol, and obtainingan initial labeling vector [0, 0, 1, 0, 0. 0] of the input address;

further, obtaining a decision vector [0.9, 0.9, 0.9, 0.9, 0.5, 0.1]through a hidden Markov labeling model (704); and

finally, the SVM classification model (706) making a decision that: theinput address hits the sanction address (708), wherein the sanctionaddress is the risk address in this embodiment.

FIG. 8 is a flowchart of a modeling and identification method 800 forrisk address identification, according to an embodiment. Referring toFIG. 8, the method 800 may include:

S802: when modeling the risk address identification model, performingparameter training, and first, acquiring a training address corpus asthe sample addresses;

S804: cleaning the training address corpus and separating them intostandardized address character strings as address word sequences;

S806: globally scanning, matching and labeling the input trainingaddress corpus, to obtain an initial labeling model and initialparameters;

S808: according to the initial labeling model, the hidden Markov modelparameters are trained to obtain a needed hidden Markov model;

S810: parameters of the SVM are trained according to the decision vectoroutput through the hidden Markov model, to obtain a needed SVM model;

S812: when performing risk address scanning and identification, anaddress is firstly input:

S814: standardization processing is performed on the input address;

S816: global risk address scanning and labeling are performed on theinput address to obtain a labeled address word sequence, and further, anobservation sequence is obtained based on the risk word and thesemantics before and after it;

S818: risk probability calculation and labeling are performed on theaddress word sequence (the observation sequence) through the hiddenMarkov model to generate a decision vector;

S820: the SVM makes a binary classification decision according to thedecision vector to determine whether the input address is a riskaddress;

S822: the result is output.

The hidden Markov model and the support vector machine are used to judgeand identify the input address based on the risk address word and thesemantics before and after it, and the accuracy of the identificationcan be effectively improved.

FIG. 9 is a block diagram of an electronic device 900, according to anembodiment. For example, the electronic device 900 may include aprocessor 902, a memory 904, and a network interface 906.

The processor 902 may include one or more dedicated processing units,application-specific integrated circuits (ASICs), field-programmablegate arrays (FPGAs), or various other types of processors or processingunits. The processor 902 is coupled with the memory 904 and isconfigured to execute instructions stored in the memory 904 to performthe above described methods.

The memory 904 may include a non-permanent memory, a random accessmemory (RAM) and/or a non-volatile memory (such as a read-only memory(ROM) or a flash memory (flash RAM)), etc. For example, the memory 904stores instructions to perform the above described methods.

Exemplary embodiments of the specification are described above. In somecases, the actions or steps specified in the claims can be performed ina different order than those in the embodiments and can still achievedesired results. Additionally, the processes depicted in the drawingsare not necessarily in a particular order or consecutive order as shownto achieve the desired results. In some implementations, multi-taskprocessing and parallel processing are also possible or may beadvantageous.

Various embodiments in the description are all described in aprogressive manner. For the same or similar parts among the embodiments,reference can be made to one another. For each embodiment, the partthereof different from the other embodiments is mainly described.Particularly, for the apparatus, electronic device, computer-readablestorage medium embodiments, reference can be made to the relevantdescription in the method embodiments.

The apparatus, electronic device and computer-readable storage medium inthe embodiments of the specification correspond to the method.Therefore, the apparatus, electronic device and computer-readablestorage medium also have the similar beneficial technical effects tothose of the corresponding method.

Each of the above described methods, modules, models, and units may beimplemented as software, or hardware, or a combination of software andhardware. For example, a Programmable Logic Device (PLD) (for example, aField Programmable Gate Array (FPGA)) is such an integrated circuit, andlogic functions thereof are determined by a user programming device.Designers program by themselves to integrate a digital system into aPLD, without having a chip manufacturer to design and manufacture adedicated integrated circuit chip. Moreover, at present, the programmingis mostly implemented using logic compiler software, instead of manuallymanufacturing an integrated circuit chip. The logic compiler software issimilar to a software complier used for developing and writing aprogram, and original code before compiling also needs to be written ina specific programming language, which is referred to as a HardwareDescription Language (HDL). There are many types of HDLs, such as ABEL(Advanced Boolean Expression Language), AHDL (Altera HardwareDescription Language). Confluence, CUPL (Cornell University ProgrammingLanguage), HDCal, JHDL (Java Hardware Description Language), Lava, Lola,MyHDL, PALASM, and RHDL (Ruby Hardware Description Language), amongwhich VHDL (Very-High-Speed Integrated Circuit Hardware DescriptionLanguage) and Verilog are most commonly used now. Those skilled in theart also should know that a hardware circuit for implementing the logicmethod procedure may be easily obtained only by slightly logicallyprogramming the method procedure using the above-described severalhardware description languages and programming same into an integratedcircuit.

A controller may be implemented in any suitable manner in the abovedescribed devices. For example, the controller may be in the form of amicroprocessor or a processor, and a computer readable medium storingcomputer readable program codes (for example, software or firmware)executable by the (micro)processor, a logic gate, a switch, anApplication Specific Integrated Circuit (ASIC), a programmable logiccontroller, and an embedded micro-controller. Examples of the controllerinclude, but are not limited to, the following micro-controllers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320.A memory controller may also be implemented as a part of a control logicof a memory. Those skilled in the art also know that, in addition toimplementing the controller by pure computer readable program codes, themethod steps may be logically programmed to enable the controller toimplement the same function in the form of a logic gate, a switch, anapplication specific integrated circuit, a programmable logic controllerand an embedded microcontroller. Therefore, such a controller may beconsidered as a hardware component, and apparatuses included therein forimplementing various functions may also be considered as structuresinside the hardware component. Alternatively, the apparatuses forimplementing various functions may even be considered as both softwaremodules for implementing the method and structures inside the hardwarecomponents.

The device, apparatus, modules or units illustrated in theabove-described embodiments can be implemented by a computer chip or anentity, or implemented by a product having a specific function. Atypical implementation device is a computer. For example, the computermay be a personal computer, a laptop computer, a cellular phone, acamera phone, a smart phone, a personal digital assistant, a mediaplayer, a navigation device, an email device, a game console, a tabletcomputer, a wearable device, or a combination of any of these devices.

For ease of description, the above-described apparatus is divided intovarious modules based on functions, and the modules are describedseparately. In an embodiment, functions of various modules can beimplemented in one or more pieces of software and/or hardware.

Those skilled in the art should understand that the embodiments of thespecification may be provided as a method, a device, or a computerprogram product. Therefore, the embodiments of the specification may beimplemented in a form of a complete hardware embodiment, a completesoftware embodiment, or a embodiment combining software and hardware.Moreover, the embodiments of the specification may be in the form of acomputer program product implemented on one or more computer-readablestorage mediums (including, but not limited to, a magnetic disk memory,a CD-ROM, an optical memory and the like) including computer usableprogram codes therein.

The specification is described with reference to flowcharts and/or blockdiagrams of the method, device (system) and computer program productaccording to the embodiments of the present invention. It should beunderstood that computer program instructions may implement each processand/or block in the flowcharts and/or block diagrams and combinations ofprocesses and/or blocks in the flowcharts and/or block diagrams. Thesecomputer program instructions may be provided to a general-purposecomputer, a special-purpose computer, an embedded processor, or aprocessor of other programmable data processing devices to produce amachine, so that an apparatus for implementing a specified function inone or more processes in the flowcharts and/or in one or more blocks inthe block diagrams is produced by the instructions executed by theprocessor of the computer or other programmable data processing devices.

These computer program instructions may also be stored in acomputer-readable memory that can guide a computer or other programmabledata processing devices to operate in a particular manner, such that theinstructions stored in the computer-readable memory produce amanufactured product, including an instruction apparatus. Theinstruction apparatus implements a function specified in one or moreprocesses in the flowcharts and/or in one or more blocks in the blockdiagrams.

These computer program instructions may also be loaded onto a computeror other programmable data processing devices, such that a series ofoperation steps are performed on the computer or other programmabledevices, thus producing computer-implemented processing. Therefore, theinstructions executed on the computer or other programmable devicesprovide steps for implementing a function specified in one or moreprocesses in the flowcharts and/or in one or more blocks in the blockdiagrams.

The computer-readable medium includes permanent and non-permanent mediaas well as removable and non-removable media, and may store informationby any method or technology. The information may be a computer-readableinstruction, a data structure, a module of a program, or other data. Anexample of the storage medium of a computer includes, but is not limitedto, a phase change memory (PRAM), a static random access memory (SRAM),a dynamic random access memory (DRAM), other types of random accessmemories (RAMs), a read-only memory (ROM), an electrically erasableprogrammable read-only memory (EEPROM), a flash memory or other memorytechnologies, a compact disk read-only memory (CD-ROM), a digitalversatile disc (DVD) or other optical storages, a cassette tape, amagnetic tape/magnetic disk storage or other magnetic storage devices,or any other non-transmission medium, and can be used to storeinformation accessible to the computing device. According to thedefinition herein, the computer-readable medium does not include acomputer-readable transitory medium, such as modulated data signals andcarriers.

It should be further noted that terms “include.” “comprise,” or anyother variations thereof are intended to cover non-exclusive inclusion,so that a process, method, article or device including a series ofelements not only includes the elements, but also includes otherelements not expressly listed, or further includes elements inherent tothe process, method, article or device. In the absence of morelimitations, an element defined by “including a/an . . . ” does notexclude that the process, method, article or device including theelement further has other identical elements.

The above described methods may be implemented by instructions executedby a computer, for example, a program module. Generally, the programmodule includes a routine, a program, an object, a component, a datastructure, and the like for executing a specific task or implementing aspecific abstract data type. The above described methods may also bepracticed in distributed computing environments. In the distributedcomputing environments, a task is executed by a remote processing deviceconnected through a communications network. In the distributed computingenvironments, the program module may be located in a local and remotecomputer-readable storage medium, including a storage device.

Although the specification has been described in conjunction withspecific embodiments, many alternatives, modifications and variationswill be apparent to those skilled in the art. Accordingly, the followingclaims embrace all such alternatives, modifications and variations thatfall within the terms of the claims.

1. A risk address identification method, comprising: acquiring anaddress word sequence corresponding to an input address; determining anaddress word in the address word sequence, the determined address wordmatching a risk word corresponding to a risk address; generating anobservation sequence corresponding to the address word sequenceaccording to the determined address word; processing the observationsequence using a hidden Markov model obtained based on semanticslearning before and after address words, to obtain a decision vector,wherein the decision vector represents probabilities of the risk addressbeing matched by address words contained in the address word sequence;and identifying whether the input address is a risk address by making aclassification decision on the decision vector.
 2. The method accordingto claim 1, wherein acquiring an address word sequence corresponding toan input address comprises: receiving an input address; performing datacleaning processing and word segmentation processing on the inputaddress to obtain the address word sequence corresponding to the inputaddress.
 3. The method according to claim 1, wherein determining anaddress word in the address word sequence matching a risk wordcorresponding to a risk address comprises: respectively matching theaddress words in the address word sequence using risk wordscorresponding to the risk address; and if one of the address words issuccessfully matched, labeling the matched address word and determiningthe matched address word as an address word matching a risk wordcorresponding to the risk address.
 4. The method according to claim 3,wherein determining an address word in the address word sequencematching a risk word corresponding to a risk address further comprises:if there is no successfully matched address word, determining that theinput address is not a risk address.
 5. The method according to claim 3,wherein generating an observation sequence corresponding to the addressword sequence according to the determined address word comprises:generating an observation sequence corresponding to the address wordsequence according to the determined address word and associated wordsof the determined address word in the address word sequence, wherein theassociated words reflect semantics before and after the determinedaddress word in the address word sequence.
 6. The method according toclaim 1, wherein obtaining a hidden Markov model based on semanticslearning before and after address words comprises: extracting initialparameters according to predefined training samples, and establishing aninitial model containing hidden Markov model parameters according to theinitial parameters, wherein the training samples are risk addresses ornon-risk addresses; generating observation sequences corresponding tothe training samples according to address words contained in thetraining samples and semantics before and after the address words; andtraining the hidden Markov model parameters according to the initialmodel and the observation sequences corresponding to the trainingsamples to obtain the hidden Markov model.
 7. The method according toclaim 6, wherein the initial parameters comprise: an initial probabilityvector and a state transition matrix; and extracting initial parametersaccording to predefined training samples comprises: based on a pluralityof predefined training samples, obtaining an initial probability vectorby respectively performing probability labeling on address wordscontained in the training samples; and obtaining a state transitionmatrix of the sample addresses according to state transitionprobabilities, between a risk word and a non-risk word, of the addresswords contained in the training samples.
 8. The method according toclaim 6, wherein training the hidden Markov model parameters accordingto the initial model and the observation sequences corresponding to thetraining samples to obtain the hidden Markov model comprises: accordingto the initial model and the observation sequences corresponding to thetraining samples, using a Baum-Welch algorithm to train the hiddenMarkov model parameters to obtain the hidden Markov model.
 9. The methodaccording to claim 1, wherein processing the observation sequence usinga hidden Markov model obtained based on semantics learning before andafter address words to obtain a decision vector comprises: processingthe observation sequence using the hidden Markov model obtained bysemantics learning before and after address words, and a Viterbialgorithm, to obtain the decision vector.
 10. The method according toclaim 1, wherein making a classification decision on the decision vectorcomprises: making a classification decision on the decision vector usinga support vector machine model obtained through training.
 11. The methodaccording to claim 10, wherein obtaining a support vector machine modelthrough training comprises: acquiring training samples for a supportvector machine; mapping the training samples of the support vectormachine to a high-dimensional feature space, to obtain a sample featurespace corresponding to the training samples of the support vectormachine; acquiring, from the sample feature space, parametersrepresenting sample features, and establishing a discrimination functionfor determining a category of the sample features according to theparameters of the sample features; and training corresponding supportvector machine parameters in the discrimination function based on thetraining samples of the support vector machine, to obtain the supportvector machine model.
 12. An electronic device, comprising: a processor;and a memory for storing instructions executable by the processor;wherein the processor is configured to: acquire an address word sequencecorresponding to an input address; determine an address word in theaddress word sequence, the determined address word matching a risk wordcorresponding to a risk address; generate an observation sequencecorresponding to the address word sequence according to the determinedaddress word; process the observation sequence using a hidden Markovmodel obtained based on semantics learning before and after addresswords, to obtain a decision vector, wherein the decision vectorrepresents probabilities of the risk address being matched by addresswords contained in the address word sequence; and identify whether theinput address is a risk address by making a classification decision onthe decision vector.
 13. The device according to claim 12, wherein inacquiring an address word sequence corresponding to an input address,the processor is further configured to: receive an input address; andperform data cleaning processing and word segmentation processing on theinput address to obtain the address word sequence corresponding to theinput address.
 14. The device according to claim 12, wherein indetermining an address word in the address word sequence matching a riskword corresponding to a risk address, the processor is furtherconfigured to: respectively match the address words in the address wordsequence using risk words corresponding to the risk address; and if oneof the address words is successfully matched, labeling the matchedaddress word and determining the matched address word as an address wordmatching a risk word corresponding to the risk address.
 15. The deviceaccording to claim 14, wherein in determining an address word in theaddress word sequence matching a risk word corresponding to a riskaddress, the processor is further configured to: if there is nosuccessfully matched address word, determine that the input address isnot a risk address.
 16. The device according to claim 14, wherein ingenerating an observation sequence corresponding to the address wordsequence according to the determined address word, the processor isfurther configured to: generate an observation sequence corresponding tothe address word sequence according to the determined address word andassociated words of the determined address word in the address wordsequence, wherein the associated words reflect semantics before andafter the determined address word in the address word sequence.
 17. Thedevice according to claim 12, wherein the processor is furtherconfigured to: extract initial parameters according to predefinedtraining samples, and establish an initial model containing hiddenMarkov model parameters according to the initial parameters, wherein thetraining samples are risk addresses or non-risk addresses; generateobservation sequences corresponding to the training samples according toaddress words contained in the training samples and semantics before andafter the address words; and train the hidden Markov model parametersaccording to the initial model and the observation sequencescorresponding to the training samples to obtain the hidden Markov model.18. The device according to claim 17, wherein the initial parameterscomprise: an initial probability vector and a state transition matrix;and in extracting initial parameters according to predefined trainingsamples, the processor is further configured to: based on a plurality ofpredefined training samples, obtain an initial probability vector byrespectively performing probability labeling on address words containedin the training samples; and obtain a state transition matrix of thesample addresses according to state transition probabilities, between arisk word and a non-risk word, of the address words contained in thetraining samples.
 19. The device according to claim 17, wherein intraining the hidden Markov model parameters according to the initialmodel and the observation sequences corresponding to the trainingsamples to obtain the hidden Markov model, the processor is furtherconfigured to: according to the initial model and the observationsequences corresponding to the training samples, use a Baum-Welchalgorithm to train the hidden Markov model parameters to obtain thehidden Markov model.
 20. The device according to claim 12, wherein inprocessing the observation sequence using a hidden Markov model obtainedbased on semantics learning before and after address words, to obtain adecision vector, the processor is further configured to: process theobservation sequence using the hidden Markov model obtained by semanticslearning before and after address words, and a Viterbi algorithm, toobtain a decision vector.
 21. The device according to claim 12, whereinin making a classification decision on the decision vector, theprocessor is further configured to: make a classification decision onthe decision vector using a support vector machine model obtainedthrough training.
 22. The device according to claim 21, wherein inobtaining a support vector machine model through training, the processoris further configured to: acquire training samples for a support vectormachine, map the training samples of the support vector machine to ahigh-dimensional feature space, to obtain a sample feature spacecorresponding to the training samples of the support vector machine;acquire, from the sample feature space, parameters representing samplefeatures, and establishing a discrimination function for determining acategory of the sample features according to the parameters of thesample features; and train corresponding support vector machine modelparameters in the discrimination function based on the training samplesof the support vector machine, to obtain the support vector machinemodel.
 23. A computer-readable storage medium storing thereon a computerprogram that, when executed by a processor of a device, causes thedevice to perform a risk address identification method, the methodcomprising: acquiring an address word sequence corresponding to an inputaddress; determining an address word in the address word sequence, thedetermined address word matching a risk word corresponding to a riskaddress; generating an observation sequence corresponding to the addressword sequence according to the determined address word; processing theobservation sequence using a hidden Markov model obtained based onsemantics learning before and after address words, to obtain a decisionvector, wherein the decision vector represents probabilities of the riskaddress being matched by address words contained in the address wordsequence; and identifying whether the input address is a risk address bymaking a classification decision on the decision vector.